package com.guomei.service.curse;

import com.guomei.bean.curse.CourseClassAssociation;
import com.guomei.utils.PageData;
import com.guomei.utils.Result;

import java.util.List;

/**
 * 课程班关联课程服务接口
 */
public interface CourseClassAssociationService {
    
    /**
     * 根据ID查询
     */
    CourseClassAssociation getById(Long id);
    
    /**
     * 查询所有
     */
    List<CourseClassAssociation> getAll();
    
    /**
     * 条件查询（分页）
     */
    Result<?> getByCondition(CourseClassAssociation courseClassAssociation);
    
    /**
     * 新增
     */
    Result<?> save(CourseClassAssociation courseClassAssociation);
    
    /**
     * 批量新增
     */
    boolean batchSave(List<CourseClassAssociation> courseClassAssociations);
    
    /**
     * 更新
     */
    boolean update(CourseClassAssociation courseClassAssociation);
    
    /**
     * 根据ID删除
     */
    boolean removeById(Long id);
    
    /**
     * 批量删除
     */
    boolean batchRemove(List<Long> ids);
    
    /**
     * 根据主课程ID查询
     */
    List<CourseClassAssociation> getByMainCourseId(Long mainCourseId);
    
    /**
     * 根据下属课程ID查询
     */
    List<CourseClassAssociation> getByDeputyCourseId(Long deputyCourseId);
    
    /**
     * 根据主课程ID删除
     */
    boolean removeByMainCourseId(Long mainCourseId);
    
    /**
     * 根据下属课程ID删除
     */
    boolean removeByDeputyCourseId(Long deputyCourseId);
    
    /**
     * 检查关联是否存在
     */
    CourseClassAssociation getByMainAndDeputyCourseId(Long mainCourseId, Long deputyCourseId);
}
